substitution debugged, add feature terms building