implemented regularized cost function correctly
implemented derivative of sigmoid function also known as sigmoid gradient