began trying to refactor