necessary refactoring, broken for now though