debug from environment variable, remove commented code