refactor problem 1
refactor 2
refactor 3