Fixed up minor things
Update sim.c
Merge pull request #44 from tassiahmed/working

Working