Added floyd algorithm
minor changes