added ks validation