added diagram of the system flow