update, logistical regression function has problem