added rm environment in the beginning of custom resource type