I really dislike multiple exit points, so refactoring to have a single return value