complete AR refactoring