add sample code and typo