In what year was Hugh Capet elected as king