refactor MAEB.