more counter logic