updated Z functions