simple graph DS finally working