reworked forwardchaining