My prolog programm is supposed to return a list of all the variables included in a term. It does work correctly, because my result is a list of all the variables. But now Prolog should stop, instead it continues and gives me the same list of variables eight times. I can't see why it doesn't stop after the solution is found. Can anybody explain to me what's my mistake?

```
variablen(X,[]):-
number(X).
variablen(X,[X]):-
atomic(X),
not(number(X)).
variablen(X+Y,R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(Y+X,R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(X+Y,R):-
variablen(X,P), variablen(Y,Q), append(P,Q,R).
variablen(X-Y, R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(Y-X, R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(X-Y,R):-
variablen(X,P), variablen(Y,Q), append(P,Q,R).
variablen(X*Y,R):-
not(number(X)),atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(Y*X, R):-
not(number(X)), atomic(X),R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(X*Y,R):-
variablen(X,P), variablen(Y,Q), append(P,Q,R).
variablen(X/Y, R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(Y/X, R):-
not(number(X)), atomic(X), R1 = [X], variablen(Y,R2), append(R2,R1,R).
variablen(X/Y,R):-
variablen(X,P), variablen(Y,Q), append(P,Q,R).
```