added optimize test