more functions in agent