defining the oscillator earlier