added subsequencing function