make the bandwidth as double type, the previous int type is not appropriate