i'm about to try to refactor this