refactored to be able to make a parallel run option
bugfix for no best solution error