switch to namedtuple