new logic to remove malformation TOA