added alt_zfactor. Not fully tested
fix stupid x11 issue with tmin