script for simulation