Adjusting algorithm for solutions