ztrace reworking. ztrace test added (under construction)