introduce GenericAtomic
introduce debug mode