I just followed an existing approach of a statically defined map, but yeah, the approach you have suggested is more robust - 96a812355506362f28090f30a540cf9a658561b5