up toast sample code