updated get_enc_classes to support envs