Implements the connect_to_machine method in relation to issue #60

Tested and resolves #60