fixed couple of problems for the Z class. Others still to be fixed.