Alternative API code.