modified code to get google ad type