Added a func for API calls