use binwrite in tests