simulations in ruby