added run length coding