adding more on cost or loss function