update attrmap function