Added average spectrum code