upgrade main dot c

working counter