made it deterministic (counter is not based on system.time.millis)