add test cases for task 4 and task 5