Added gain and updated documentation