- trying to make the algorithm work