added delete document functionality