finally got this fckn agent to work properly