Added support for multiple solutions.