some small code snippets