some code refactoring
code refactoring
code refactoring
some refactoring and clean up