Initial code for graphs