Changed geting nodes list in Graph (simplified implementation)