changed way db created