Add code for graphs