added a test for ex5.