cleaning code, refactoring