make row detection work