Started implementation of graph calc