some potentially useful snippets