reset now working, refactored the methods for changing gain and offset