fix connection to server
adding agent2 action
merge with branch