02 refactored solution