added condition diagram.
writing logic operation.