clean up the code.
refactoring.