added create document functionality
added document edit functionality