add distance support