add some code snippets to hw1