backward tree chaining implemented