Commented some logic