first version of mf.hpp