Made mask to area id a little more flexible in preparation from retrieving the mapping from tehhe model content