about to refactor massively