Add else branch to handle distance selection