update minimal sample code