Refactored: removed unnecessary early return