added varargin