fun with prolog.