Add skeleton of optimize