refactoring for AM11