weights reimplemented