move route modification to a callable