finish fork/join function

finish fork/join function