finished input parsing and object creation for graph