add support for weight to utils