replace fork with Process.spawn