small efficienies in spectra making scripts