Added more implementation for rle