Refactor convolve