refactored api initialization