complete refactor of all the things