Updating codes for homework1.
Just testing simulate method.