added interface to weights for library