Simplify sample code