data structure and convolution rewritten