remove dead code
A lookup array is faster than a function with linear search. The old function was not used for years - spring cleaning.