My customized version of goagent