refactor all the things