fixed code snippets in docs