working on distance formula