doc and diagram