Using list of tuples instead of dictionary