cleaning up snippets to more of my liking