refactor opps