finished cs758 asst-8