changed API that users can select to calculate convolution or
correlation