added recalculating of graphs when boxes move