added setImmediate shim