reduce code required for embedding