factored out AA