update API
fix compile crash
fixes #39
add a .gitignore