some refactoring and starting over because shit