some prolog work that I did before