modified nargin lines to suit the input argument change
Merge branch 'xjiang' of https://github.com/bitterleaf/memo_rep into xjiang