misc snippets