simulation of KMR model