weight int->double everywhere