finally backend works; i have to fix things in the ui