Added callbacks for functions