implement hash-map
probably faster bytes_append
better error messages