better path solution