add result.json to gitignore
add more test and refactor