added custom exception and updated pz lib