sample code, fixed compile error