implemented distance virtual interface