correctly implement memop handling