Corrected error on which colums to sum
adding systems for storing modeldata in database