added namedtuple functionality