Update samples code