created fork routine