designing algorithm that advances state simulations