made some changes and fixed a typo