remove usage of bytebuffer just for the sake of a byte array