mini code snippets that might be useful for future-use.