refactor wip on z_binary_table