made improvements in comparing apectrogram, also added outer loop