P045: more readable solution