implemented first steps of graph creation