changing Rd squared distance