add gdist.