Changed calculation of graphs