started to write a testcase, not sure whether it is done properly