some util methods to accomplish embed and extract operations