use a dictionary rather than a tuple to represent a snippet