Class validation alg works