separation of UI and API