Switch to a linear cost functional