Add a hash map to look up the index by its name
revert the inline function keyword