add convergence check
take size as argument, add debug messages
align graph spec