logic table building debug