I think this line should say, self.state instead of self.state