improve readability
replace redundant data structure