[Problem002] refactor