improved forkptyrouter