small refactor.
Refactor code.