Obama finished writing the book in 2008 , after he was elected but before taking office .
Obama finished writing the book in 2008 , after he was elected but before he took office .