minimal refactor to the env provider