Phelps adds to Olympic legend with 17th gold medal