20130304: improving performance of all_solution