set controller logic for env