kind of done, time to refactor