added some api stuff.. too tired