implement document update
clean logging for debug
implement delete