Advance code. Starts graph structure