Changed weights from ints to doubles
Adopted test to use decimal weight values
Restored old method for int weights for backwards compatibility