added an improved version of floyd and its dep graph