checking returned value