fixed hw 4 mistakes