added gain to z axis control