added .gitignore and completed the getM() function