router and database complete