adding API endpoint