add delete weight function