added fork to main function area