change to gmt4 and change a little code i->d as units