refactor problem002