Completed self.max method