finished process_wait(), tested