graph hw6. task #2 added