improvements on the Prolog engine instantiations