finished primative operations, added patch struct