working gradientDescentSeperated