ver4

finish the main function of process f & g