Much better.

Minor nit: three lines are repeated in both branches of this if/else. Cleaner if you pull them out of the conditional?