Refactor for more idiomaticness