fixed grahp reading function
Input/Output functions for graphs ready