move logic to relative function module in route