add test case for z-function