Why was the declaration of independence written