better X detection