setting and getting documents