correct return statement in put function