Use enumerate instead of a manual counter