fixed gain equation and began implementation of testing