iterating on the embedded Prolog engine
improving the signature of the toTerm method