double independent subfunctions work