some work on snippets, nearly there...