code cleanup & refactoring
code cleanup & refactoring