implementation of sendRaw