extracted DB creation to a method from main function