code cleanup after refactoring