added index and save methods to document mananger