Problem with using special function