added diagram and corrections