revision of original AgentJBaseClass