adapt to use label for api