added snr plotting function