update mode mapping.