fixed return function