re-implemented oracle aligning logic