refactor oracle processing