slower version using a class instead of a python dictionary
updated readme