LAI-5: updated database connection creation