add ex6-4, not tested