Implemented and tested simple distance analysis mechanism