added a counter, more TODO