Changed N_trans functin to use convolution function