edited bhmcmc.m