separated out distance calcs