added fm_elim function