snippets extraction and drawing