MF_theory.py code added