added some api, some changes