fixed "delete" and "update" methods