a2 refactor