Replaced tuples with dictionary to improve code readability.