still trying to split api and ui properly