add snippets shamelessly stolen from @kassio