Creates the Distance convertor function

- Split into 2 functions to seperate the For Loops