corrected agent treatment as non pointer type