attempting to refactor