state can now be a list or dict
compensate for state being 2x longer when a dict rather than a list
Merge pull request #15 from pbrady/add_dict

state can now be a list or dict