gives proper distance value and can calculate coordinates