add .gitignore
add function ref:issue #3