main API entry