Changed iteration way through list of tuples.