check in alg