refactoring a bunch of stuff