modified the gradient descent to detect better change in beta to know when to stop. Also enabled verbose mode