code cleanup
refactoring