negative weights taken care of