add callbacks for update