still testing applymcmc and fixing bugs

it is still WIP, but now with far less bugs and probably it does not crash now