Includes correct convolution function calculation