update ex6 of CS229