refactored A2