refactor code.
Refactor code to decress code