cleaned up and documented likely_environment