private boolean findPictures(String address, boolean UserInput) {
        //open url, establish connection and read content
        try {
            URL url = new URL(address);
            URLConnection connection = url.openConnection();
            String line;
            StringBuilder builder = new StringBuilder();
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            while ((line = reader.readLine()) != null) {
                builder.append(line);
            }
            reader.close();

            // construct a JSONObject from page content
            JSONObject json = new JSONObject(builder.toString());
            if (json.getJSONObject("responseData").getJSONArray("results").length() == 0) {
                return false;
            } else {
                int randNumb = (int) (Math.random() * 6);
                //chooses random picture of first 6 url returned
                String imageUrl = json.getJSONObject("responseData").getJSONArray("results").getJSONObject(randNumb).getString("unescapedUrl"); //get the url-property of a json object              
                helper.add(imageUrl);   // add  founded picture to helper list

                if (UserInput == true) {
                    return true;
                } else {
                    return false;
                }
            }
        } catch (UnknownHostException e) {
            // if no internet connection                  
            System.out.println("no internet connection");
            return false;
        } catch (Exception e) {
            // catch all other exceptions
            System.out.println("something went wrong in the google search api");
            return false;
        }
    }