connect UI to API