added maxsize and minsize functionality
fixed errors with min/maxdepth