added sample code.