fix example code snippet in docs