clarified how to use cost function J(theta)