fixed bug in calc_result where weights were not being applied