The logic for green and red flags for vehicles seems to work