code cleanup
Refactoring code