re-organise ByteArray tests
reduce function call overheads