Adding partition check

might as well make this  self.partition since the only reason you're adding it to to reference it in another class