various snippets of code