working an embed function