refactored out key counter rc