updated to use environment variables to configure database