done:cnd_rr; todo:cnd_geo_dist
done: fix RCODE bug; todo: test fix, do cnd_geo_dist
fix bugs