updated currentstarvedinverter, created tonegenerator.sub