[AM] refactoring, design