added new Graph structure and started new algorithm of representation