smarter forward chaining