path detection is now working