major refactor, broke everything