add embedding support with -w option