implement 8 testcases