Use struct to achieve the same purpose with dictionary.