change immediateSend to sendImmediate