add callbacks for Layout