done some refactoring shit