use atomic adds to ensure synchronicity