update source code to compile with latest embd