fixed errors in dm hw2