Using input table to drive conditional logic