added slewing to gain changes