Modify class convMxM for thinning