refactored RGammaDisc
switched out RGammaDisc for another algorithm, seems to fix error
added atomic extension and use atom_inc, guaranteed to be atomic as per documentation