moved calculations to graph

had to split them up b/c they were over nogas stupid line limit, but so far they work with the testing I have done