dynamic array used, size of message removed from receive and send