When Kennedy first ran for the Senate in 1962 , at the age of thirty , for the seat that JFK vacated when he was elected president , the rap against him was that if his name were Edward Moore his candidacy would be a political joke .