setImmediate code