added embedded support