added optimization testing code1