Tested Code with Updated Simulator