update to match changes in pyzcasp and improve readability