updating for counter