Make make algorithm works