add run function to path's router callback