changed getCounter to static