graph library and class