refactoring of following agents.