replace namedtuple with classes so this will work with python2.5