debug for api init