modifications to snippets I made in last few weeks