added the rest of the occilator code