Implemented protocol opInsert and opUpdate (untested)