seperate create app and create db function