fixed return at end of function