added some more methods to handle documents