almost as 3x faster to encode