t658 added logic for various columns