refactoring, cleaing up