add ex5 (decode routine).