change runProcess() to accept timeout value as input