Path detection