adds embed function through pym.js