move function search to promotion.js