added optimize