update ex5 and ex6