added controller gain change functionality