refactor acc dialog