implemented counters and writes for the topology