handling tabs and counts