updated embedded code