adding some new code snippets

they were mighty useful...