solved 1d clumping problem