Added simSBM function.