refactor the code.


