checking return value