update with sample code