I think 3 return statements is better than this solution