fixed a bug and added gitignore