finished graph functionality