added synopsis and diagram.