optimization part started