fixed waiting time.
Fix algorithm for when to increment ready/running/waiting/done to match sample output.
Added average waiting time to output. Small fixes for the output.