updates to weights for elements, also fixes issue #11