shift modified, and other changes in cost function