adding counter and other misc