rename method document to addDocument