#3 use setImmediate instead of process.nextTick