prefer setImmediate to process.nextTick