improve routing and database support