better path handling, better request control logic