make gain configurable on init