made mine-counting work