bytes are sending, need to fix malloc and memcopy