fix multiple id and sum hell

remove idSum variable
keep   db.numberOfBookSolution

other changes as well (...)