Update solving logic