short functional code snippets