improve routing mechanism