added support for decimal weights