begin write function, remove redunancy from .gitignore