added test for agent