refactored return statements