Output is correct and return statement is there