script to perform MC step