Looking at the logic further below, I think this should be cleaner.