nearly completed op-based implementation