Made convolve function