Made alg better