made gain switchable