Building main idea and code of SmallGraph