fixed omission of return statement in sum squared error function