fixed gp hard code in distance