more refractoring so it works now for healthbars