start refactoring old snippets