Change weigth from int to double.