shorten code snippets