initial commit of homework2 and code snippets