Add support for weights