modified the counter visit