cleaning and refactoring l2a