further restructuring and condence of code
rename agent_ fiels to install_ to be more clear