since both return the same value, wouldn't a single return statement at the end (outside the `if`) do?