move return to the inside of the case statement