clean up & refactoring