added move to front transform to encoding