refactoring so we can properly gemify