Create routing_function