use ArrayBuffer instead of node's Buffer and update tests