Environment detecting added