add factor, Mirah and mathematica