cleanup, refactoring