bug fix
update code to embedded sample