corrected more code snippets