Added some api functions