Added some useful code snippets