added sample code, comments