added get_mod_mask function