use setImmediate instead of process.nextTick

setImmediate more closely resembles async operations such as db or filesystem calls