add .gitignore and some code changed