added linear cost layer.