basic structure for optimization started