-added update, insert and delete method