added tqFindDiff function