madegc counter. NEEDS TOP BE IMPLEMENTED TOUGH