using process.nextTick