switched from spawn to fork