first full implementation of new err func, tested only with ToFit.verify