replacing self.count with result.num counter, this makes the code cleaner as only a few extra line sof codee needed