refactor some things to better spots