refactoring, clean up