added convolution functions but functions are somehow undefined and probably needs fixing soon