Working on calculating the path