add a check of python input for replaceByClumps() method
further improvements in clump logic