Added some atomic routines