refactored with better variable names, and inlined numeral to value map
and lookup function