fixed code in sample