prior to refactor