simplified path setting logic