database connection now working