sequence-m function