modified databaseconnect for local environment