refactoring and now using dotenv for development