update gitignore with OSX and added problem4,5 code