improved KS test