refactor + SimpleDirectedWeightedGraf