added check for api methods