step-03 solution - refactor