create the main file for MCMC use. Test result not so nice need improve