upadte some sample code