changed request to self.request