conditional logic half done