minor fixes; final version for assignment 4 submission