some snippets and defuns