This is a program for optimization