changed API (agent, application parameter -> object) + new code style