more fixes and updates for categorical tables
amending merge