added optimization comparison