test fork function