refactor to use environment variables for sensitive keys