first version of MH sampler +some new classes