investigating a problem with path algorithm problem