Add api for external calling