adding all changes to hw7.