added pagoda env detection