change argumet order in errorSingle and gradientDescentSeperated