done some refactoring