assignment 3 of NLP course (not finished)