made likely_environment recursive