Fills in connect_to_host function