connect to server, update context, create instances
example for testing