move db init to app file