a more complex test, uses consult and a some prolog code