added simulation code
added simulation code
added simulation code