started refactoring to atomic based section