main prog

checks distance