read input from stdin for simulations