added getnoncolspanindex function