refactoring: remove redundant return statements