adding api and more ui stuff