put creation of Moperator, J, dv, f, v in separate function