another small refactor. Works