simplifying embed logic