trying to reduce alg