adding edit functionality - documents