fixed issue2 -- withdrew the previous statements on defun, it was just my simple mistake.