Added code snippets [NOT A WORKING VERSION]