hw3 second exercise