added optimization tests