remove distance dependencies
remove unneeded code and distance dependencies