added auto db creation if one doesnt exist