added addAgent and fireAgent