early return should be at the top (line 9)