Use a namedtuple to keep errors in