convert wait3, wait4 to passing return arguments see #103