Added routing logic