simplify RLE commands to minimum