added convertToAd on js