implement createFromArrayBuffer