updated zGetPOP() function