remove redundant getDistance call