fix parens
simplified and quickened subsort check