Finished working on function to sort,angle,distance