fixed syntax errors in sample code