Improved routing logic with contraint blocks]=