define some api methods