removed all instances of proc->wait from the code.
this was unecesary in the current code.