added method to create database if it doesn't exist