change conditional to do less work