def setS(self, s):
    if ((s > 1) or (s < 0)):
        raise ValueError('saving rate must be in between 0 and 1')
    self.S = S
def setS(self, s):
    if ((s > 1) or (s < 0)):
        raise ValueError('saving rate must be in between 0 and 1')
    self.S = S