refactoring atomic instruction wrappers