Connects to internet and makes query