Added update/delete logic