got rid of illegal non-ascending cols case. added more checking