changed messages to be a local var, instead of being exposed on self.