Updated to route dynamically