working version of env violation assumption checking