Update routing logic