Added update and insert methods