001 solution
refactor