refactor a bunch more