refactor for simplification
Refactor.