replaced actors with atomic integer