reworking the refactor