changed raw implementation from std::vector to uint8_t*