Optionally set the difference threshold