atomic: added comments and fixed variable names