refactor problem 43