Bug Fixes with add pair.
New test cases added for DEFUN