Updated Agent.java to what it should have been