create graph from input data
stub test
add test