run the google function only on click