rewrite for cheerio & jquery compatibility