Added examples to cost function