added atomic counter for fun